<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>简单站点</title>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  <script type="text/javascript">
  	
  	function testContent(){
  		var testurl = $("#yldz").val();
  		var zwnr = $("#zwnr").val();
  		var bmlx = $("#bmlx").val();
  		 $.ajax({
             //提交数据的类型 POST GET
             type:"POST",
             //提交的网址
             url:"simpleSiteController.do?testXpath",
             //提交的数据
             data:{testurl:testurl,zwnr:zwnr,bmlx:bmlx},
             dataType:'json',
             //成功返回之后调用的函数             
             success:function(data){
            	if(data.success==true){
            		$("#test_content").html(data.msg);
            	}else{
            		alert(data.msg); 
            	}        
             },
             //调用执行后调用的函数
             complete: function(XMLHttpRequest, textStatus){
             },
             //调用出错执行的函数
             error: function(){
                 //请求出错处理
             }         
        });
  	}
  </script>
 </head>
 <body style="overflow-y: hidden" scroll="no">
  <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="simpleSiteController.do?save">
			<input id="id" name="id" type="hidden" value="${simpleSitePage.id }">
			<table style="width: 800px;" cellpadding="0" cellspacing="1" class="formtable">
				<tr>
					<td align="right">
						<label class="Validform_label">
							站点标识:
						</label>
					</td>
					<td class="value">
						<input class="inputxt" id="zdbs" name="zdbs" datatype="*" readonly="readonly"
							   value="${simpleSitePage.zdbs}">
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							编码类型:
						</label>
					</td>
					<td class="value">
						<t:dictSelect typeGroupCode="zfj" id="bmlx" field="bmlx" hasLabel="false" defaultVal="${simpleSitePage.bmlx}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							智能编码:
						</label>
					</td>
					<td class="value">
						<t:dictSelect typeGroupCode="YN" field="znbm" hasLabel="false" defaultVal="${simpleSitePage.znbm}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							样例地址:
						</label>
					</td>
					<td class="value">
						<input class="inputxt" id="yldz" name="yldz" ignore="ignore" readonly="readonly"
							   value="${simpleSitePage.yldz}">
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							来源方式:
						</label>
					</td>
					<td class="value">
						<t:dictSelect typeGroupCode="nmstype" field="wzlx" hasLabel="false" defaultVal="${simpleSitePage.wzlx}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							判重方式: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="pcfs"
							field="pcfs" hasLabel="false" defaultVal="${simpleSitePage.pcfs}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							标题xpath:
						</label>
					</td>
					<td class="value">
						<input class="inputxt" id="btnr" name="btnr" value="${simpleSitePage.btnr}">
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							正文内容xpath:
						</label>
					</td>
					<td class="value">
						<input class="inputxt" id="zwnr" name="zwnr" datatype="*"
							   value="${simpleSitePage.zwnr}"><a href="#" style="padding-left: 20px;" onclick="testContent();">点击测试</a>
						<br>
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							测试抓取正文内容:
						</label>
					</td>
					<td id="test_content_td" class="value">
						<textarea class="textareaclass" id="test_content" style="height: 100px;width: 500px;" readonly="readonly"></textarea>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							是否配置:
						</label>
					</td>
					<td class="value">
						<t:dictSelect typeGroupCode="YN" field="sfpp" hasLabel="false" defaultVal="${simpleSitePage.sfpp}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				
			</table>
		</t:formvalid>
 </body>